package com.hall;

import com.mbrs.aggr.MySession;
import com.mbrs.repo.MySessionRepository;
import erp.redis.RedisRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RedisMySessionRepository extends RedisRepository<MySession, String> implements MySessionRepository {

    @Autowired
    public RedisMySessionRepository(RedisTemplate redisTemplate) {
        super(redisTemplate, 30000L);
    }

    public List<String> getAllSessionIds() {
        return this.queryAllIds();
    }
}